/*-------------------------------------------------------------------------

***************** Modification History ***********************************
   @doc
   @module pstrt.h - Protoypes for SCALLS source file |
   @end
   
$Log: /SoftPay/SPK2SIM/Source/Include/pscalls.h $ 
 * 
 * 8     3/19/00 7:26p Jim_b4
 * 
 * 7     3/16/00 6:34p Jim_b4
 * Code security functionality added
 * 
 * 6     3/10/00 8:15p Kevin_v1
 * 
 * 5     2/21/00 3:00p Jim_b4
 * Include file restructuring
 * 
 * 4     1/20/00 5:18p Page_k1
 * Add message parameter to inSelectHost() and use different message when
 * called from inGetCkHostNum()
 * 
 * 3     12/10/99 2:14p Kevin_v1
 * Remove Record Size parameter reliance in CrearteRecordList(),
 * SelectRecord(), ConfRecEdit() which was not required.  Function
 * inGetRecordDescriptor() computes record length from FLD file. This
 * smooths implemtation of Multple Merchant functionatlity
 * 
 * 2     12/01/99 11:28a Kevin_v1
 * Clean up
 * 
 * 1     11/22/99 1:10p Jim_b4

**************************************************************************

   Copyright (C) 1999 by VeriFone, Inc.

   All rights reserved.  No part of this software may be reproduced,
   transmitted, transcribed, stored in a retrieval system, or translated
   into any language or computer language, in any form or by any means,
   electronic, mechanical, magnetic, optical, chemical, manual or otherwise,
   without the prior written permission of VeriFone, Inc.

---------------------------------------------------------------------------*/
  
#include <list.h>

typedef  int (*PFI_RL_IN_IN_CP)(RecordList *, int, int, char *);
typedef  VS_BOOL *(*PFB_FL_IN)(FieldList *, int);
int inCredDebBatchExists (RecordList *prlRecordList, int inRecordIndex, int inFieldIndex, char *pchValue);
int inCSTExists (RecordList *prlRecordList, int inRecordIndex, int inFieldIndex, char *pchValue);
int inHFTHostExists (RecordList *prlRecordList, int inRecordIndex, int inFieldIndex, char *pchValue);
int inCkHostExists (RecordList *prlRecordList, int inRecordIndex, int inFieldIndex, char *pchValue);
int inIndBatchExists (RecordList *prlRecordList, int inRecordIndex, int inFieldIndex, char *pchValue);
int inGetRecordCount ( char *pszFileName, int inRecordSize);
void vdDrawCSTNode(RecordList *prlRecordList, RecordNode *pndCSTNode);
void vdDrawHostNode(RecordList *prlRecordList, RecordNode *pndHostNode);
int inCreateFieldList(RecordList *prlRecordList, RecordNode *pndRecordNode, VS_BOOL *(*pfnFieldValidator)(), FieldList  **ppflFieldList);
void vdGetFieldNodeValue (RecordList *pflFieldList, int  inFieldIndex, char *szFieldValue);
void vdGetFieldNodeDisplayValue(RecordList *prlRecordList, int inFieldIndex, char *szFieldValue);
void vdRotatingDisplay(char *pchDispBuf);
void vdSingleLineRotation(FieldList *pflFieldList, FieldNode *pndFieldNode);
void vdDisplayFieldNode(FieldList *pflFieldList, FieldNode *pndFieldNode);
void vdDisp3200CfgVal(int inLineLen, int inCol, int inLine, char *szBuf, int inClr);
void vdDisplayMultiLineField (int inTermCharsPerRow, int inLine, char * szDisplayBuffer, char * szFieldValue);
int inCreateRecordList (const char *pszRecordType, RecordList **pprlRecordList, int(* pfnRecordValidator)(), int inFieldIndex, char *pchValue);
int inSelectRecord(const char *pszFileName, int (*pfnRecordValidator)(), int inFieldIndex, char *pchValue,
                   void (*pfnDisplayRecord)(), long lnErrorMessage);
int inSelectHFTRecord (char *pszFileName, int (*pfnRecordValidator)(), int inFieldIndex, char *pchValue,
    void (*pfnDisplayRecord)(), long lnErrorMessage);
int inSelectHost(int inFieldIndex, char *pchValue, int (*inFunc)(), long lnErrorMessage);
int inSelectHFTHost(int inFieldIndex, char *pchValue, int (*inFunc)());
int inSelectCSTRecord (char *pszFileName, int (*pfnRecordValidator)(), int inFieldIndex, char *pchValue,
    void (*pfnDisplayRecord)(), long lnErrorMessage);
int inSelectCurrency (int inFieldIndex, char *pchValue, int (*inFunc)());
void vdDisplayHexRow(char *pchSourceAddr, int  inByteCount);
int inGetRecordDescriptor(const char *pszRecordType, FieldDefinition **ppsrFieldDefinitionRecord, int *pinTitleFieldIndex);
void vdDisplayRecordNode (RecordList *prlRecordList, RecordNode *pndRecordNode);
int inEditField(FieldList *pflFieldList, FieldNode *pfnSelectedField, int *inFieldChgd);
int inEditRecord(RecordList *prlRecordList, Node *pndSelectedRecord);
int inConfRecEdit(const char *pchDataFileName);
int inBatchRecEdit(void);
void vdValidateValidationInitializations (List *pliListOfChoices);

void vdUpdateExpConfigLabels (List *pliListOfChoices);
short shListEntry (const ListEntry *leList, short shListSz, char * szFieldValue);
short shChoiceEntry (const ListEntry *leList, short shListSz, char * szFieldValue);

int SCALLS_CODE_CHECK(char * a,char *b,short *  c,char * d,unsigned char * e);

